Material describes how an object interacts with light.
More...
|
| System::String^ | Name [get] |
| | The unique name of the material. More...
|
| |
| System::String^ | Label [get, set] |
| | Optional label. More...
|
| |
| MaterialType | Type [get, set] |
| | The material type. More...
|
| |
| Color | BaseColor [get, set] |
| | Base color. More...
|
| |
| bool | UseBaseColorFromEntity [get] |
| | If this flag is set, DbEntity::Color is used instead of BaseColor. More...
|
| |
| System::Nullable< float > | Albedo [get, set] |
| | Albedo equals the luminance of the base color or the average luminance of the base color texture in linear color space. More...
|
| |
| float | Metallic [get, set] |
| | Metallness of the surface. More...
|
| |
| float | Roughness [get, set] |
| | The roughness of the surface. More...
|
| |
| float | Clearcoat [get, set] |
| | Weight of clearcoat layer. More...
|
| |
| float | ClearcoatRoughness [get, set] |
| | Roughness of clearcoat layer. More...
|
| |
| float | Sheen [get, set] |
| | Intensity of sheen layer. More...
|
| |
| Color | SheenColor [get, set] |
| | Color of sheen layer. More...
|
| |
| float | SheenRoughness [get, set] |
| | Roughness of sheen layer More...
|
| |
| float | Transparency [get, set] |
| | Transparency. More...
|
| |
| float | RefractiveIndex [get, set] |
| | Index of refraction. More...
|
| |
| Color | EmissiveColor [get, set] |
| | Emissive color. More...
|
| |
| float | Luminance [get, set] |
| | Luminance. More...
|
| |
| bool | ReadOnly [get] |
| | Returns if material is read-only. More...
|
| |
Material describes how an object interacts with light.
| X3g::Plugin::Material::Material |
( |
System::String^ |
pName, |
|
|
MaterialType |
pType |
|
) |
| |
Creates a new material within the current document.
- Exceptions
-
| System::NotSupportedException | Thrown if a material with this name already exists. |
| void X3g::Plugin::Material::BeginEdit |
( |
) | |
|
Enables editing of material.
This method has to be called before any setters.
| void X3g::Plugin::Material::EndEdit |
( |
) | |
|
Finishes editing of material.
Material is written to database when this function is called.
| bool X3g::Plugin::Material::Equals |
( |
System::Object^ |
pOther) | |
|
|
overridevirtual |
Compares two Materials.
- Returns
- true if both are equal.
false otherwise.
| int X3g::Plugin::Material::GetHashCode |
( |
) | |
|
|
overridevirtual |
Hash the Material and get the hash value.
Returns an optional list of sound absorption values.
Returns texture image of given type.
BaseColor and Emissive textures are gamma-corrected (SRGB). Metallic, Roughness, Normal, ClearcoatNormal and Opacity textures are linear.
Returns texture matrix for given texture transform type.
Returns texture matrix for given texture type.
Convenience function which internally calls GetTextureMatrix() with corresponding texture transform type.
| Material X3g::Plugin::Material::LoadMatz |
( |
array< unsigned char >^ |
pData) | |
|
|
static |
Load a Material by byte array.
The byte array should have the content of a matz file.
| static Material ^ X3g::Plugin::Material::LoadMatz |
( |
System::String^ |
pFileName) | |
|
|
static |
| void X3g::Plugin::Material::SetSoundAbsorption |
( |
IEnumerable< SoundAbsorption >^ |
pValues) | |
|
Sets an optional collection of sound absorption values.
| void X3g::Plugin::Material::SetTextureImage |
( |
TextureType |
pType, |
|
|
Image^ |
pImage |
|
) |
| |
Sets texture image of given type.
The BaseColor and Emissive textures are expected to be in SRGB. Metallic, Roughness, Normal, CleacoatNormal and Opacity textures should be linear.
Setting base color texture resets Albedo.
Sets texture matrix for given texture transform type.
| bool X3g::Plugin::Material::Unlock |
( |
) | |
|
Tries to unlock read-only material.
Returns if unlock succeeded.
| void X3g::Plugin::Material::WritePreviewImage |
( |
Stream^ |
pPNGStream, |
|
|
MaterialPreviewType |
pType, |
|
|
int |
pSize |
|
) |
| |
Write PreviewRender Image as PNG stream.
- Parameters
-
| pPNGStream | Output Stream |
| pType | Specify how to present the preview. |
| pSize | Render size. Will generate a pSize x pSize image. |
| System:: Nullable< float> X3g::Plugin::Material::Albedo |
|
getset |
Albedo equals the luminance of the base color or the average luminance of the base color texture in linear color space.
If albedo is null, the base color or base color texture is used for rendering as it is. If albedo is set, the base color or texture is blended with black or white accordingly for rendering. MaterialUtility provides helper functions to apply albedo to base color.
| Color X3g::Plugin::Material::BaseColor |
|
getset |
Base color.
Base color is gamma-corrected (SRGB).
Setting base color resets Albedo.
| float X3g::Plugin::Material::Clearcoat |
|
getset |
Weight of clearcoat layer.
| float X3g::Plugin::Material::ClearcoatRoughness |
|
getset |
Roughness of clearcoat layer.
| Color X3g::Plugin::Material::EmissiveColor |
|
getset |
Emissive color.
Color of light originating from an object. Emissive color is gamma-corrected (SRGB).
| System:: String^ X3g::Plugin::Material::Label |
|
getset |
| float X3g::Plugin::Material::Luminance |
|
getset |
Luminance.
The luminance indicates how much luminous power will be detected by an eye looking at the surface from a particular angle of view.
| float X3g::Plugin::Material::Metallic |
|
getset |
Metallness of the surface.
| System:: String^ X3g::Plugin::Material::Name |
|
get |
The unique name of the material.
| bool X3g::Plugin::Material::ReadOnly |
|
get |
Returns if material is read-only.
It's not allowed to change properties of read-only materials.
| float X3g::Plugin::Material::RefractiveIndex |
|
getset |
Index of refraction.
Can be changed for MaterialType::Glass only.
| float X3g::Plugin::Material::Roughness |
|
getset |
The roughness of the surface.
| float X3g::Plugin::Material::Sheen |
|
getset |
Intensity of sheen layer.
| Color X3g::Plugin::Material::SheenColor |
|
getset |
| float X3g::Plugin::Material::SheenRoughness |
|
getset |
| float X3g::Plugin::Material::Transparency |
|
getset |
Transparency.
Transparency is the percentage of light which passes through the material without being scattered.
| bool X3g::Plugin::Material::UseBaseColorFromEntity |
|
get |